package com.hzy.nursing.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 预约信息数据传入对象 (Data Transfer Object)
 *
 * @author HZY
 */
@Data
@ApiModel(description = "预约信息传入实体")
public class ReservationDto {

    @ApiModelProperty(value = "预约人姓名", required = true)
    @NotBlank(message = "预约人姓名不能为空")
    private String name;

    @ApiModelProperty(value = "预约人手机号", required = true)
    @NotBlank(message = "预约人手机号不能为空")
    private String mobile;

    @ApiModelProperty(value = "预约时间", required = true, example = "2025-10-11 10:00:00")
    @NotNull(message = "预约时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    @ApiModelProperty(value = "探访人姓名", required = true)
    @NotBlank(message = "探访人姓名不能为空")
    private String visitor;

    @ApiModelProperty(value = "预约类型，0：参观预约，1：探访预约", required = true)
    @NotNull(message = "预约类型不能为空")
    private Integer type;
    
    @ApiModelProperty(value = "备注")
    private String remark;
}